<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <script th:src="@{/script/vue.js}"></script>
    <script th:src="@{/script/axios.min.js}"></script>
</head>
<body>
<h3>文件上传</h3>
<form th:action="@{/user/register4}" method="post" enctype="multipart/form-data">
    用户名: <input type="text" name="userId"><br>
    真实姓名: <input type="text" name="realName"><br>
    年龄: <input type="text" name="age"><br>
    照片: <input type="file" name="photo1"><br>
    <input type="submit" value="注册">
</form>
<p th:text="${error}"></p>
<hr>
<h3>文件下载(项目目录下)</h3>
<img th:src="@{/upload/c4c219f1-5cb1-45f9-aa94-98a9d990234e_1.jpg}" width="100px"><br>
<a th:href="@{/upload/c4c219f1-5cb1-45f9-aa94-98a9d990234e_1.jpg}">下载图片(直接打开)</a>
<a th:href="@{/user/download(photoName=c4c219f1-5cb1-45f9-aa94-98a9d990234e_1.jpg)}">下载图片(弹框下载)</a>
<h3>文件下载(硬盘上d:/upload 目录下)</h3>
<a th:href="@{/user/download2(photoName=eeaf47fa-490b-4b44-b20b-c1fb50a998f9_1.jpg)}">下载图片(直接打开)</a>
<a th:href="@{/user/download3/eeaf47fa-490b-4b44-b20b-c1fb50a998f9_1.jpg}">restful下载图片(弹窗下载)</a>
</body>
</html>